<template>
	<view class="content">

	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad: function() {
			this.captureImage();
		},
		methods: {
			captureImage: function() {
				var cmr = plus.camera.getCamera();
				var res = cmr.supportedImageResolutions[0];
				var fmt = cmr.supportedImageFormats[0];
				console.log("Resolution: " + res + ", Format: " + fmt);
				cmr.captureImage(function(path) {
						console.log("Capture image success: " + path);
					},
					function(error) {
						console.log("Capture image failed: " + error.message);
					}, {
						resolution: res,
						format: fmt
					}
				);
			}
		}
	}
</script>

<style>

</style>
